package cn.icanci.loopstack.ddk.web.mapping;

import java.util.Collection;
import java.util.List;

/**
 * @author icanci
 * @since 1.0 Created in 2023/01/06 21:11
 */
public interface BaseWebMapping<T, R> {

    /**
     * web2vo
     * 
     * @param t T
     * @return R
     */
    R web2vo(T t);

    /**
     * webs2vos
     *
     * @param ts T
     * @return R
     */
    List<R> webs2vos(List<T> ts);

    /**
     * vo2web
     *
     * @param r R
     * @return T
     */
    T vo2web(R r);

    /**
     * vos2webs
     * 
     * @param rs R
     * @return T
     */
    List<T> vos2webs(Collection<R> rs);
}
